<div class="task_right_detail_inner">
    <div class="document-left">
        <div class="document_title">
            <h3>{{file.filename}}</h3>
        </div>
        <div class="document_text">
            {{if file.isPic}}
            <div class="img_preview">
                <img src="{{file.fileurl}}"/>
            </div>

            {{else if (canConvert && file.swfurl == '')}}
            <div class="no_preview">
                <p>{{ 'TWITTERFILE_DOC_TRANSFORM_NOT_READY' | i18n}}</p>
            </div>

            {{else if (file.swfurl == '')}}
            <div class="no_preview">
                <p>{{ 'TWITTERFILE_PREVIEW_NOT_AVAILABLE' | i18n}}<span>
                    {{if permission.canDownload}}
                                <a href="{{file.downloadUrl}}">{{ 'TWITTERFILE_DOWNLOAD_READ' | i18n}}</a></span>。
                    {{/if}}
                    {{if !permission.canDownload}}{{ 'TWITTERFILE_DOWNLOAD_READ' | i18n}}</span>。{{/if}}
                </p>
            </div>


            {{else if (file.swfurl == 'CONVERT_FAILED')}}
            <div class="no_preview">
                <p>{{ 'TWITTERFILE_TRANSFORM_FAILURE' | i18n}}<span><a
                        href="{{file.downloadUrl}}">{{ 'TWITTERFILE_DOWNLOAD_READ' | i18n}}</a></span>。</p>
            </div>

            {{else}}
            <div id="flashContent" module="flexpaper">
            </div>

            {{/if}}

        </div>
        <div class="level_rating">
            <span>评级：</span>

            <div>
                <ul class="star-rating">
                    {{if !file.starRate}}
                    <li class="current-rating current-rating0"></li>
                    <li>
                        <a class="one-star" title="1" data-value="10" href="#"></a>
                    </li>
                    <li>
                        <a class="two-stars" title="2" data-value="20" href="#"></a>
                    </li>
                    <li>
                        <a class="three-stars" title="3" data-value="30" href="#"></a>
                    </li>
                    <li>
                        <a class="four-stars" title="4" data-value="40" href="#"></a>
                    </li>
                    <li>
                        <a class="five-stars" title="5" data-value="50" href="#"></a>
                    </li>


                    {{else}}
                    <li class="current-rating current-rating{{file.starViewRate}}"></li>
                    {{/if}}

                </ul>
            </div>
            <div class="show_tool">
                <ul style="float:right;" class="tool_list">
                    <li>
                        <a href="javascript:void(0)" class="done">
                            <span>{{ 'TWITTERFILE_READ' | i18n}}：</span>
                            <span>{{file.viewTimes}}</span>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)" class="done">
                            <span>{{ 'DOWNLOAD' | i18n}}：</span>
                            <span>{{file.downloadTimes}}</span>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)" class="done">
                            <span>{{ 'APPS_FEED_COMMENT' | i18n}}：</span>
                            <span>{{file.commentTimes}}</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="document_comment">
            <div style="display: block;padding-bottom:0;" class="show_comment clear">
                <div class="comment_content clear">
                    <a href="javascript:;">
                        <img title="{{file.userName}}" alt="{{file.userName}}"
                             src="{{file.userIcon}}"
                             ucard="uid={{file.userId}}"></a>

                    <div class="right_comment">
                        <a href="javascript:;" class="username">{{file.userName}}</a>
                        <span>{{ 'TWITTERFILE_UPLOAD_DOC_BY_MYSELF' | i18n}}</span>

                        <div class="show_tool">
                            <a class="publish_time" href="javascript:void(0)">{{file.createdAt}}</a>
                            <ul class="tool_list"></ul>
                        </div>
                    </div>
                </div>
            </div>
            <div style="display:block;" class="show_comment js-comments clear"></div>
        </div>
    </div>
    <div class="document-right">
        <div class="base_info clear">
            <h5>
                <span>{{ 'TWITTERFILE_OPERATE' | i18n}}</span>
            </h5>
            <ul class="document_set">
                {{if permission.canDownload}}
                <li class="set_download">
                    <a title="{{ 'DOWNLOAD' | i18n}}" href="{{file.downloadUrl}}"></a>
                </li>
                {{/if}}
                {{if permission.filePublicAccess && permission.isOwner}}
                <li class="set_share">
                    <a href="javascript:void(0);" systemId="502" systemItemId="{{file.id}}" title="{{ 'SHARE' | i18n}}"></a>
                </li>
                {{/if}}
                <li class="set_collect  {{if file.favTag}}has_collect{{/if}}">
                    <a title="{{ 'TWITTERFILE_FAVORITES' | i18n}}" href="javascript:void(0);"></a>
                </li>
            </ul>
        </div>
        <div class="base_info incharge clear">
            <h5>
                <span>{{ 'TWITTERFILE_UPLOAD_USER' | i18n}}</span>
            </h5>

            <div class="userinfo">
                <a href="javascript:void(0);">
                    <img title="{{file.userName}}" alt="{{file.userName}}"
                         src="{{file.userIcon}}"
                         ucard="uid={{file.userId}}"></a>
                <ul>
                    <li>
                        <a target="_blank" href="/final/user.action?uid={{file.userId}}" class="username" ucard="uid={{file.userId}}">{{file.userName}}</a>
                    </li>
                    <li>
                        <a target="_blank" href="/final/depart.action?gid={{depart.groupId}}">{{depart.name}}</a>
                    </li>
                </ul>
            </div>
        </div>
        {{if file.groupPermission == 0}}
        <div class="base_info clear">
            <h5>
                <span>{{ 'TWITTERFILE_DOC_LABEL' | i18n}}</span>
                <a href="javascript:void(0);" class="edit" act="tf_label_edit"></a>
                <a href="javascript:void(0);" class="mo hidden" act="tf_label_save" style="display: none;">{{ 'TWITTERFILE_COMPLETE' | i18n}}</a>
            </h5>

            <p id="tf_label_content">
                <span title="{{ 'TWITTERFILE_NO_LABEL' | i18n}}" class="editor_pen">{{ 'TWITTERFILE_NO_LABEL' | i18n}}</span>
            </p>
        </div>
        {{/if}}
        {{if permission.isOwner}}
        <div class="base_info clear">
            <h5>
                <span>{{ 'TWITTERFILE_DOC_DESCRIPTION' | i18n}}</span>
                <a href="javascript:void(0);" class="edit" act="tf_desc_edit"></a>

                <a href="javascript:void(0);" class="mo hidden" style="display: none;" act="tf_desc_save">{{ 'TWITTERFILE_COMPLETE' | i18n}}</a>

            </h5>

            <p id="tf_desc_content">
                {{if file.description == ''}}
                <span title="{{ 'TWITTERFILE_NO_DESCRIPTION' | i18n}}" class="editor_pen">{{ 'TWITTERFILE_NO_DESCRIPTION' | i18n}}</span>
                {{else}}
                {{file.description}}
                {{/if}}

            </p>
        </div>
        {{/if}}
        <div class="infolist02 base_info clear">
            <h5>
                <span>{{ 'TWITTERFILE_READ_PERMISSON' | i18n}}
                    {{if permission.filePublicAccess}}
                         <em class="read_public">({{ 'TWITTERFILE_DOC_ALL' | i18n}})</em>
                    {{else}}
                         <em class="read_private">({{ 'TWITTERFILE_DOC_PRIVATE' | i18n}})</em>
                    {{/if}}
                </span>
                {{if permission.fileAccessSetAuth}}<a act="tf_read_permission_edit" href="javascript:void(0)" style="display: block;" class="edit"></a> {{/if}}

            </h5>
            {{if permission.filePublicAccess}}
            <p class="read_all">{{ 'TWITTERFILE_PERMISSION_ALL' | i18n}}</p>
            {{/if}}
            {{if !permission.filePublicAccess}}
                <ul class="people_list">
                    {{each userAccesses as userAccess idx}}
                    <li>
                        <a href="javascript:void(0)">
                            <img title="{{userAccess.name}}" alt="{{userAccess.name}}"
                                 src="{{if userAccess.icon}}{{userAccess.icon}} {{else}}/img/default_face.png{{/if}} "
                                 ucard="uid={{userAccess.id}}"></a>
                    </li>
                    {{/each}}
                </ul>

                <ul class="business_list">
                    {{each groupAccesses as group idx}}
                    {{if group.permission == 1}}
                    <li><a href="javascript:void(0);" href="javascript:void(0)">{{group.name}}</a></li>
                    {{/if}}
                    {{/each}}
                </ul>
            {{/if}}
        </div>
        <div class="infolist02 base_info clear">
            <h5>
                <span class="js-download-span">
                  {{ 'TWITTERFILE_DOWNLOAD_PERMISSION' | i18n}}
                     {{if permission.fileDownloadAccess}}
                              <em class="read_public">({{ 'TWITTERFILE_NOT_LIMITED' | i18n}})</em>
                     {{else}}
                            <em class="read_private">({{ 'TWITTERFILE_LIMITED' | i18n}})</em>
                     {{/if}}
                </span>
                {{if permission.fileAccessSetAuth}} <a act="tf_download_permission_edit" href="javascript:void(0)" style="display: block;" class="edit"></a>{{/if}}
            </h5>
            {{if permission.fileDownloadAccess}}
                 <p class="read_all">{{ 'TWITTERFILE_NOT_LIMITED' | i18n}}</p>
            {{/if}}

            {{if !permission.fileDownloadAccess}}
            <ul class="people_list">
                {{each userDownloadAccesses as userDownloadAccess idx}}
                <li>
                    <a href="javascript:void(0)">
                        <img title="{{userDownloadAccess.name}}" alt="{{userDownloadAccess.name}}"
                             src="{{if userDownloadAccess.icon}}{{userDownloadAccess.icon}} {{else}}/img/default_face.png{{/if}} "
                             ucard="uid={{userDownloadAccess.id}}"></a>
                </li>
                {{/each}}
            </ul>

            <ul class="business_list">
                {{each groupDownloadAccesses as groupDownload idx}}
                {{if groupDownload.permission == 1}}
                <li><a href="javascript:void(0);" href="javascript:void(0)">{{groupDownload.name}}</a></li>
                {{/if}}
                {{/each}}
            </ul>
            {{/if}}

        </div>

        {{if relevantFiles && relevantFiles.length > 0 }}
        <div class="infolist02 base_info clear">
            <h5>
                <span>{{ 'TWITTERFILE_DOC_RELATED' | i18n}}</span>
            </h5>
            <ul class="file_list">
                {{each relevantFiles as relevantFile idx}}
                <li>
                    <a title="{{relevantFile.fileName}}" target="_blank" href="/final/file.action?fid={{relevantFile.id}}"
                       class="file_class file_class_document">{{relevantFile.fileName}}</a>
                </li>
                {{/each}}
            </ul>
        </div>
        {{/if}}
        {{if otherFiles && otherFiles.length > 0 }}
        <div class="infolist02 base_info clear">
            <h5>
                <span>{{ 'TWITTERFILE_OTHER_DOC' | i18n}}</span>
            </h5>
            <ul class="file_list">
                {{each otherFiles as otherFile idx}}
                <li>
                    <a title="{{otherFile.fileName}}"  target="_blank" href="/final/file.action?fid={{otherFile.id}}"
                       href="javascript:void(0);" class="file_class file_class_document">{{if otherFile.fileName}}{{otherFile.fileName}} {{else}} {{otherFile.content}}{{/if}}</a>
                </li>
                {{/each}}
            </ul>
        </div>
        {{/if}}
    </div>
</div>